package action.test

import cn.zwx.learn.basic.redis_lock.MyRedisLock
import cn.zwx.learn.basic.redis_lock.MyRedisLockTest
import cn.zwx.learn.basic.utils.SpringUtil
import com.alibaba.fastjson.JSON
import cn.zwx.learn.basic.groovy.handler.GroovyHandler
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component

/**
 * @description:
 *@projectName:java-basic
 * @see:action.test
 *@author:zhangwenxue
 * @createTime:2021 /4/1413:11
 * @version:1.0
 */
class Cls_rule_1  implements GroovyHandler{

    private Logger logger = LoggerFactory.getLogger(Cls_rule_1.class);


    @Override
    Object invoke(Object obj) {
        logger.info("调用rule1,请求参数:{},", JSON.toJSONString(obj))
        SpringUtil.getInstance().getBean("action.test.Cls_rule_2").invokeMethod("invoke",obj)
        // 调用rule2 TODO
        return "处理成功!!!"
    }
}
